In the GUI, ensure that all binary options appear on the command. This is especially...
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 31 Oct 2010 19:31:26 +0000 (19:31 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 31 Oct 2010 19:31:26 +0000 (19:31 +0000)
gpsbabel/gui/mainwindow.cpp

index 26a03152f424ca6251ec2b289cd76fe65d9c4948..d28d879523385f64de3d49ab8fcd38ffefd3a7c2 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: mainwindow.cpp,v 1.25 2010-09-02 03:10:46 robertl Exp $
+// $Id: mainwindow.cpp,v 1.26 2010-10-31 19:31:26 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -111,8 +111,14 @@ static QString MakeOptions(const QList<FormatOption>& options)
     if (options[i].getSelected()) {
       str += ",";
       str += options[i].getName();
-      if (options[i].getType() != FormatOption::OPTbool) {
-       str += "=" + options[i].getValue().toString();
+      if (options[i].getType() == FormatOption::OPTbool) {
+        str += "=1";
+      } else {
+        str += "=" + options[i].getValue().toString();
+      }
+    } else {
+      if (options[i].getType() == FormatOption::OPTbool) {
+        str += "," + options[i].getName() + "=0";
       }
     }
   }